package com.googlecode.garbagecan.cxfstudy.filetransfer;

import org.apache.cxf.interceptor.LoggingInInterceptor;
import org.apache.cxf.interceptor.LoggingOutInterceptor;
import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
import org.apache.cxf.transport.common.gzip.GZIPInInterceptor;
import org.apache.cxf.transport.common.gzip.GZIPOutInterceptor;

public class FileTransferServer {
	
	public static void main(String[] args) throws Exception {
		JaxWsServerFactoryBean factoryBean = new JaxWsServerFactoryBean();
		factoryBean.getInInterceptors().add(new LoggingInInterceptor());
		factoryBean.getOutInterceptors().add(new LoggingOutInterceptor());
		factoryBean.getInInterceptors().add(new GZIPInInterceptor());
		factoryBean.getOutInterceptors().add(new GZIPOutInterceptor());
		
		factoryBean.setServiceClass(FileTransferServiceImpl.class);
		factoryBean.setAddress("http://0.0.0.0:9000/ws/jaxws/fileTransferService");
		factoryBean.create();
	}
}
